package com.hx.Dao;

import com.hx.DBUtlis;
import com.hx.entity.Regions;
import org.hibernate.Query;
import org.hibernate.Session;

import java.util.List;

public class RegionsDao extends DBUtlis<Regions> {


    @Override
    public List<Regions> findAll() {
        Session session=super.getSessionFactory().getCurrentSession();
        session.beginTransaction();
        Query query= session.createQuery("from Regions");
        return query.list();
    }
}
